#ifndef _LENGTHUNIT_H_
#define _LENGTHUNIT_H_

#include "Unit.h"
#include <string>


#define CONST_LENGTH_UNIT_REFERECE \
    const LengthUnit&
#define DECL_GET_LENGTH_UNIT(unit) \
    static CONST_LENGTH_UNIT_REFERECE GET_UNIT(unit)
class LengthUnit : public Unit
{
public:    
    const LengthUnit& getBaseUnit() const;

public:
    DECL_GET_LENGTH_UNIT(Mile);
    DECL_GET_LENGTH_UNIT(Yard);
    DECL_GET_LENGTH_UNIT(Feet);
    
private:
    LengthUnit(int ratePerBaseUnit, std::string name);
};

#define LENGTH_UNIT_SCOPE \
    LengthUnit::
#define SINGLETON_LENGTH_UNIT(unit) \
    LENGTH_UNIT_SCOPE GET_UNIT(unit)

//The Singleton Units in the system
#define MILE SINGLETON_LENGTH_UNIT(Mile)
#define YARD SINGLETON_LENGTH_UNIT(Yard)
#define FEET SINGLETON_LENGTH_UNIT(Feet)

#endif

